package com.hyt.it.ogt.ks.model.entity.mongodb;

import java.io.Serializable;
import java.time.LocalDateTime;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * @author wuyingge
 * @ClassName CandidateAnswerLog.java
 * @Description 考生保存答案请求参数日志
 * @createTime 2021年10月16日 14:13:00
 */
@Data
@EqualsAndHashCode()
@Accessors(chain = true)
@Builder
@Document("ks_candidate_answer_log")
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "CandidateAnswerLog", description = "考生保存答案请求参数日志")
@Getter
@Setter
public class CandidateAnswerLog implements Serializable {
    private static final long serialVersionUID = -6845899986543323855L;

    @Id
    private String id;

    @ApiModelProperty(value = "考试id")
    private String examId;

    @ApiModelProperty(value = "考生Id")
    private String candidateId;

    @ApiModelProperty(value = "查看答案和解析状态，0：未查看，1：已查看")
    private Integer viewAnswerDescription;

    @ApiModelProperty(value = "试卷顺序号")
    private Integer paperSort;

    @ApiModelProperty(value = "答题作答时长（毫秒）")
    private Long answerTime;

    @ApiModelProperty(value = "小题编码")
    private String itemId;

    @ApiModelProperty(value = "试题排序")
    private Integer itemSort;

    @ApiModelProperty(value = "题型（单选题、多选题等）")
    private String itemType;

    @ApiModelProperty(value = "选项id，前端新建试卷时无需传值，编辑试卷时也无需传值")
    private String optionId;

    @ApiModelProperty(value = "答案")
    private String userAnswer;

    private Boolean loading;

    @ApiModelProperty(value = "创建时间", hidden = true)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss" , timezone="GMT+8")
    private LocalDateTime createDate;
}
